CC=g++
CFLAGS=-c -Wall -g
LDFLAGS=-lsfml-graphics -lsfml-audio -lsfml-system -lsfml-window -ltinyxml 
SOURCES=VisibleGameObject.cpp TileSheet.cpp TileSheetManager.cpp Common.cpp Tile.cpp GreenTile.cpp RedTile.cpp PhysicsManager.cpp LevelLoader.cpp Engine.cpp main.cpp Level.cpp InputManager.cpp GameObjectManager.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=nelsk-runner-cpp

all: $(SOURCES) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@

.cpp.o:
	$(CC) $(CFLAGS) $< -o $@

obj:
	$(CC) $(CFLAGS) $(SOURCES)

clean:
	rm -rf *o $(EXECUTABLE)

rebuild: clean all
